shuzi=input()
pingbi=input()

dict_s={
    "0": ["a","b","c"],
    "1": ["d","e","f"],
    "2": ["g", "h", "i"],
    "3": ["j", "k", "l"],
    "4": ["m", "n", "0"],
    "5": ["p", "q", "r"],
    "6": ["s", "t"],
    "7": ["u", "v"],
    "8": ["w", "x"],
    "9": ["y", "z"]
}

def backtrack(conbin,next):
    if len(next)==0:
        res.append(conbin)
    else:
        for c in dict_s[next[0]]:
            backtrack(conbin+c,next[1:])

res=[]
backtrack("",shuzi)
for i in res:
    if i==pingbi:
        res.remove(i)

print(res)
